package ee.roosideSoda.frontend.controller.menucontrollers;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class MenuControllerFactory 
{
	public MenuController create(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
	{

		MenuController menuController = null;

		try 
		{
			if (request.getParameter("mode") != null)
			{
				/*
				if (request.getParameter("mode").equals("administerRegularReadings"))
				{
					menuController = new AdministerRegularReadingsMenuController();
				}
				else if (request.getParameter("mode").equals("administerElectricityContractsPage"))
				{
					menuController = new AdministerElectricityContractsMenuController();
				}
				else
				{
					menuController = null;
				}	
				*/
			}
			else
			{
				menuController = null;
			}
		} 
		catch (Exception ex) 
		{
			ex.printStackTrace();
		}
		
		return menuController;
	}
}
